/**
 *
 * LustBrain.brain( xo );
 * ...
 * xo.goal( {x:18,y:343} );
 *
 */
var LustBrain = function( sprite, map ) {

	this.goal = function( pos ) {
		this.getLust().force( pos.x, pos.y );
	};
	
	this.clear = function() {
		this.getLust().clear();
	};
	
	////

	this.run = function( t ) {
		this.getLust().stepSprite( this.getSprite() );
		return true;
	};

	////

	this.setSprite = function( sprite ) {
		this.sprite_ = sprite;
	};

	this.getSprite = function() {
		return this.sprite_;
	};

	this.setMap = function( map ) {
		this.map_ = map;
	};

	this.getMap = function() {
		return this.map_;
	};

	this.setLust = function( lust ) {
		this.lust_ = lust;
	};

	this.getLust = function() {
		return this.lust_;
	};

	this.init = function( sprite, map ) {
		this.setSprite( sprite );
		this.setMap( map );
		this.setLust( new Lust69( map ) );
	};
};

LustBrain.brain = function( xo ) {
	xo.setBrain(
		new LustBrain( xo.getSprite() , xo.getMap() )
	);
};
